﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.UpdateServer
{
    public static class ConsoleCMD
    {
        public static bool Execute(string cmdString)
        {
            string[] cmdStringArr = cmdString.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            if (cmdStringArr.Length > 0)
            {
                string cmd = cmdStringArr[0].ToUpper();

                if (cmd == "CLEAR")
                {
                    Console.Clear();
                    return false;
                }
                else if (cmd == "EXIT")
                {
                    return true;
                }
            }
            return false;
        }
    }
}
